Class: Taksi::Values::Dynamic

Inherits:
Object
  • Object
show all
Defined in:
lib/taksi/values/dynamic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(component, name, field = nil) ⇒ Dynamic

Returns a new instance of Dynamic.



8
9
10
11
12
# File 'lib/taksi/values/dynamic.rb', line 8

def initialize(component, name, field = nil)
  @component = component
  @name = name
  @field = field
end

Instance Attribute Details

#componentObject (readonly)

Returns the value of attribute component.



6
7
8
# File 'lib/taksi/values/dynamic.rb', line 6

def component
  @component
end

#fieldObject (readonly)

Returns the value of attribute field.



6
7
8
# File 'lib/taksi/values/dynamic.rb', line 6

def field
  @field
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/taksi/values/dynamic.rb', line 6

def name
  @name
end

Instance Method Details

#as_jsonObject



20
21
22
# File 'lib/taksi/values/dynamic.rb', line 20

def as_json
  nil
end

#dynamic?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/taksi/values/dynamic.rb', line 24

def dynamic?
  true
end

#pathObject



14
15
16
17
18
# File 'lib/taksi/values/dynamic.rb', line 14

def path
  return field if field

  "#{component.id}.#{name}"
end

#static?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/taksi/values/dynamic.rb', line 28

def static?
  false
end