Class: Pressy::Action::Pull

Inherits:
Object
  • Object
show all
Defined in:
lib/pressy/action/pull.rb

Defined Under Namespace

Classes: LocalPost

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Pull

Returns a new instance of Pull



6
7
8
9
# File 'lib/pressy/action/pull.rb', line 6

def initialize(params)
  @local_posts = params.fetch(:local)
  @server_posts = params.fetch(:server)
end

Instance Attribute Details

#server_postsObject (readonly)

Returns the value of attribute server_posts



4
5
6
# File 'lib/pressy/action/pull.rb', line 4

def server_posts
  @server_posts
end

Instance Method Details

#changesetObject



15
16
17
# File 'lib/pressy/action/pull.rb', line 15

def changeset
  @changeset ||= build_changeset
end

#has_changes?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/pressy/action/pull.rb', line 11

def has_changes?
  changeset.has_changes?
end