class Fountain::Field

Fountain Field

Attributes

raw_data[R]

Raw field data

Public Class Methods

new(data) click to toggle source

@param [Hash] data Raw field data

# File lib/fountain/field.rb, line 14
def initialize(data)
  @raw_data = Util.stringify_hash_keys data
end

Public Instance Methods

inspect() click to toggle source
# File lib/fountain/field.rb, line 33
def inspect
  format(
    '#<%<class_name>s:0x%<object_id>p @type="%<type>s" @question="%<title>s">',
    class_name: self.class.name,
    object_id: object_id,
    type: type,
    question: question
  )
end
key() click to toggle source

Key

# File lib/fountain/field.rb, line 29
def key
  raw_data['key']
end
question() click to toggle source

Question

# File lib/fountain/field.rb, line 19
def question
  raw_data['question']
end
type() click to toggle source

Type

# File lib/fountain/field.rb, line 24
def type
  raw_data['type']
end