Class: Motion::Xray::Editor

Inherits:
Object
  • Object
show all
Defined in:
lib/motion-xray/xray_editors.rb

Direct Known Subclasses

PropertyEditor

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, property) ⇒ Editor

Returns a new instance of Editor.



13
14
15
16
# File 'lib/motion-xray/xray_editors.rb', line 13

def initialize(target, property)
  @target = target
  @property = property
end

Instance Attribute Details

#propertyObject

Returns the value of attribute property.



5
6
7
# File 'lib/motion-xray/xray_editors.rb', line 5

def property
  @property
end

#targetObject

Returns the value of attribute target.



4
5
6
# File 'lib/motion-xray/xray_editors.rb', line 4

def target
  @target
end

Class Method Details

.with_target(target, property: property) ⇒ Object



8
9
10
# File 'lib/motion-xray/xray_editors.rb', line 8

def with_target(target, property:property)
  self.new(target, property)
end

Instance Method Details

#did_change?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/motion-xray/xray_editors.rb', line 18

def did_change?
  false
end

#get_edit_view(container_width) ⇒ Object



22
23
24
# File 'lib/motion-xray/xray_editors.rb', line 22

def get_edit_view(container_width)
  @edit_view ||= self.edit_view(container_width)
end